<%@ page import="java.util.HashMap,common.CommonUtil,java.util.*,common.*" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/WEB-INF/commontags.tld" prefix="common" %><%--페이징처리tag--%>
<%
UserSession userSession = (UserSession)session.getAttribute("user"); 

String login_id = null;
String user_id = null;
String level = null;
String admin_ent_id = null;

if(userSession!= null){
	login_id = userSession.getLogin_id();
	user_id = userSession.getUser_id();
	level = userSession.getAdmin_level();
	admin_ent_id = userSession.getEnt_id();
}

String search_combo 	= CommonUtil.nvl(request.getParameter("search_combo"),"");
String keyword 		= CommonUtil.nvl(request.getParameter("keyword"),"");
String line_number	= CommonUtil.nvl(request.getParameter("line_number"),"10");
//페이징 처리 Start
//페이지 표시정보 받기 혹은 검색입력창
String curr_page = CommonUtil.nvl(request.getParameter("curr_page"),"1");

String one_group = CommonUtil.nvl(request.getParameter("one_group"),"10");
String total_count = CommonUtil.nvl(request.getParameter("total_count"),"0");
//페이징 처리 End

String member_id	= CommonUtil.nvl(request.getParameter("member_id"),""); 
String gubun	= CommonUtil.nvl(request.getParameter("gubun"),""); 
String start_date	= CommonUtil.nvl(request.getParameter("start_date"),""); 
String end_date	= CommonUtil.nvl(request.getParameter("end_date"),"");

HashMap listMap=(HashMap)request.getAttribute("list_map");

HashMap map  = null;
ArrayList list=null;


String total_cnt	= "0";
String level1	= "0";
String level2	= "0";
String level3	= "0";
String level4	= "0";
String level5	= "0";
String level6	= "0";
String level7	= "0";
String level8	= "0";

String level1_per_cnt	= "0";
String level2_per_cnt	= "0";
String level3_per_cnt	= "0";
String level4_per_cnt	= "0";
String level5_per_cnt	= "0";
String level6_per_cnt	= "0";
String level7_per_cnt	= "0";
String level8_per_cnt	= "0"; 


if (listMap!=null){
    list=(ArrayList)listMap.get("mainContent");
    
}

if(list != null){
	if(list.size() > 0){		
		
		total_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("total_cnt"),"0");
		level1 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level1"),"0");
	    
		level2 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level2"),"0");
		level3 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level3"),"0");
		level4 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level4"),"0");
		level5 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level5"),"0");
		level6 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level6"),"0");
		level7 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level7"),"0");
		level8 = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level8"),"0");
	    
		level1_per_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level1_per_cnt"),"0");

		level2_per_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level2_per_cnt"),"0");
		level3_per_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level3_per_cnt"),"0");
		level4_per_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level4_per_cnt"),"0");
		level5_per_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level5_per_cnt"),"0");
		level6_per_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level6_per_cnt"),"0");
		level7_per_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level7_per_cnt"),"0");
		level8_per_cnt = CommonUtil.nvl((String)((HashMap)list.get(0)).get("level8_per_cnt"),"0");
	}
}
%>
<jsp:include page="/jsp/common/header.jsp"></jsp:include>

<style>
body{background-color:#fff;background:#ffffff}
</style>

<form name="mainform"  method="post" action = "/speaking.pb" >
	<div id="bodyContainer">
        <div id="contents">
          
          
          <div class="statistics_opic">
          	<dl title="성적 통계">
              <dt>성적  통계</dt>
            </dl>
            <table class="graphTb">
              <tr>
                <th width="120">등급</th>
                <th width="750">그래프</th>
                <th>취득횟수</th>
              </tr>
<%               

    if (list!=null && list.size()> 0) {
    	
%>
			  <tr>
                <td>Level1</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=level1_per_cnt%>%" height="10" /><br />
                  <%=level1_per_cnt%>%</td>
                <td><%=level1 %></td>
              </tr>
              
              <tr>
                <td>Level2</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=level2_per_cnt%>%" height="10" /><br />
                  <%=level2_per_cnt%>%</td>
                <td><%=level2 %></td>
              </tr>
              
              <tr>
                <td>Level3</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=level3_per_cnt%>%" height="10" /><br />
                  <%=level3_per_cnt%>%</td>
                <td><%=level3 %></td>
              </tr>
              
              <tr>
                <td>Level4</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=level4_per_cnt%>%" height="10" /><br />
                  <%=level4_per_cnt%>%</td>
                <td><%=level4 %></td>
              </tr>
              
              <tr>
                <td>Level5</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=level5_per_cnt%>%" height="10" /><br />
                  <%=level5_per_cnt%>%</td>
                <td><%=level5 %></td>
              </tr>
              
              <tr>
                <td>Level6</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=level6_per_cnt%>%" height="10" /><br />
                  <%=level6_per_cnt%>%</td>
                <td><%=level6 %></td>
              </tr>
              
              <tr>
                <td>Level7</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=level7_per_cnt%>%" height="10" /><br />
                  <%=level7_per_cnt%>%</td>
                <td><%=level7 %></td>
              </tr>
              
              <tr>
                <td>Level8</td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=level8_per_cnt%>%" height="10" /><br />
                  <%=level8_per_cnt%>%</td>
                <td><%=level8 %></td>
              </tr>
<%	      
    	
    }else{
%>
              <tr>
                <td colspan=4 align=center>성적통계 자료가 없습니다.</td>
              </tr>
<%} %>              
              
            </table>            
          </div>
          
          
        </div>
      </div>


<input type="hidden" name="cmd" value="">
<input type="hidden" name="member_id" value="<%=member_id %>">
<input type="hidden" name="user_id" value="<%=user_id %>">
<input type="hidden" name="member_test_code" value="">
</form>

<iframe name='hidden_frm'  width='0' height='0' SCROLLING='AUTO' frameborder='0'></iframe>
<jsp:include page="/jsp/common/bottom.jsp"></jsp:include>
